﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using UTC_Project_Manager.Model;

namespace UTC_Project_Manager.Controls
{
    /// <summary>
    /// Interaction logic for MainControl.xaml
    /// </summary>
    public partial class MainControl : UserControl
    {
        public static AccueilControl accueilControl;
        public static SettingsControl settingsControl;

        public delegate void HighlightSettingsTab();
        public static event HighlightSettingsTab highlightSettingTabEvent;

        public MainControl()
        {
            InitializeComponent();
            accueilControl = new AccueilControl();
            settingsControl = new SettingsControl();

            if (!App.MyConfig.IsLoaded)
            {
                this.AccueilGrid.Children.Add(settingsControl);
                highlightSettingTabEvent();
            }
            else
                this.AccueilGrid.Children.Add(accueilControl);
        }
    }
}
